import request from '@/utils/request'

// 查询单聊记录列表
export function listChatUserMessage(query) {
  return request({
    url: '/weblog/chatUserMessage/list',
    method: 'get',
    params: query
  })
}

// 查询单聊记录详细
export function getChatUserMessage(id) {
  return request({
    url: '/weblog/chatUserMessage/' + id,
    method: 'get'
  })
}

// 新增单聊记录
export function addChatUserMessage(data) {
  return request({
    url: '/weblog/chatUserMessage',
    method: 'post',
    data: data
  })
}

// 修改单聊记录
export function updateChatUserMessage(data) {
  return request({
    url: '/weblog/chatUserMessage',
    method: 'put',
    data: data
  })
}

// 删除单聊记录
export function delChatUserMessage(id) {
  return request({
    url: '/weblog/chatUserMessage/' + id,
    method: 'delete'
  })
}
export function listFriendMessage(query) {
  return request({
    url: '/weblog/chatUserMessage/listFriendMessage',
    method: 'get',
    params: query
  })
}

export function getChatUserMessageListByUserId(query) {
  return request({
    url: '/weblog/chatUserMessage/getChatUserMessageListByUserId',
    method: 'get',
    params: query
  })
}


export function setMessageRead(query) {
  return request({
    url: '/weblog/chatUserMessage/setMessageRead',
    method: 'get',
    params: query
  })
}
